<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/WEB-INF/templates/template.xhtml">
	<ui:define name="breadcrumb">
		<ui:include src="breadcrumb.xhtml" />
	</ui:define>
	<ui:define name="menu">
		<ui:include src="/user/menu.xhtml" />
	</ui:define>
	<ui:define name="title">Cargar Datos de Prueba</ui:define>
	<ui:define name="content">
	    <h:form id="form">
	        <rich:progressBar mode="ajax" 
	        	value="#{loadDataBean.currentValue}" interval="2000" id="pb"
	            enabled="#{loadDataBean.enabled}" minValue="0" maxValue="100" reRenderAfterComplete="progressPanel">
	            <f:facet name="initial">
	                <h:panelGroup>
	                    <h:outputText value="El proceso no ha comenzado todavia" />
	                    <br/>
	                    <a4j:commandButton action="#{loadDataBean.startProcess}" value="Comenzar Proceso" execute="@form"
	                        render="pb" rendered="#{loadDataBean.buttonRendered}" style="margin: 9px 0px 5px;" />
	                </h:panelGroup>
	            </f:facet>
	            <f:facet name="finish">
	                <h:panelGroup>
	                    <h:outputText value="Proceso Completado" />
	                    <br/>
	                    <a4j:commandButton action="#{loadDataBean.startProcess}" value="Reiniciar Proceso" execute="@form"
	                        render="pb" rendered="#{loadDataBean.buttonRendered}" style="margin: 9px 0px 5px;" />
	                </h:panelGroup>
	            </f:facet>
	            <h:outputText value="#{loadDataBean.currentValue} %" />
	        </rich:progressBar>
	    </h:form>
	</ui:define>	
</ui:composition>
